#ifndef __PCPT_COMM_BASE_H__
#define __PCPT_COMM_BASE_H__

#include "comm_extend/comm_base_extend.h"

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <cmath>
#include <iostream>
#include <list>
#include <vector>
#include <string>

/* 定义栅格 */
typedef struct GROUND_GRID_RANGE_STRU {
    float           gridUnitSize;
    float           groundMinX;
    float           groundMaxX;
    float           groundMinY;
    float           groundMaxY;

    UINT32          gridSizeX;
    UINT32          gridSizeY;
    UINT32          groundGridMax;
    
    GROUND_GRID_RANGE_STRU(float unitSize, float minX, float maxX, float minY, float maxY, UINT32 sizeX, UINT32 sizeY, UINT32 gridMax)
    {
        gridUnitSize    = unitSize;
        groundMinX      = minX;
        groundMaxX      = maxX;
        groundMinY      = minY;
        groundMaxY      = maxY;

        gridSizeX       = sizeX;
        gridSizeY       = sizeY;
        groundGridMax   = gridMax;
    }
    
    GROUND_GRID_RANGE_STRU(void)
    {
        gridUnitSize    = 0;
        groundMinX      = 0;
        groundMaxX      = 0;
        groundMinY      = 0;
        groundMaxY      = 0;

        gridSizeX       = 0;
        gridSizeY       = 0;
        groundGridMax   = 0;
    }
} GROUND_GRID_RANGE_STRU;

typedef struct COOR_TYPE_STRU {

    string map ;
    string base_link;
    
    COOR_TYPE_STRU(void)
    {
      map = "map";
      base_link = "base_link";
    }

} COOR_TYPE_STRU;

/**************************************************************************************
功能描述: 激光雷达数据分割
修改记录:
**************************************************************************************/
typedef struct SEGMENT_RESULT_STRU{
    SEGMENT_RESULT_STRU(){
        pGroundPoints.reset(new MyCloud());
        pNoGroundPoints.reset(new MyCloud());
        pBreakPoints.reset(new MyCloud());
        pCornerPoints.reset(new MyCloud());
    };
    MyCloud::Ptr pGroundPoints;
    MyCloud::Ptr pNoGroundPoints;
    MyCloud::Ptr pBreakPoints;
    MyCloud::Ptr pCornerPoints;
} SEGMENT_RESULT_STRU;

/**************************************************************************************
功能描述: 深度相机数据分割
修改记录:
**************************************************************************************/
typedef struct V_SEGMENT_RESULT_STRU{
    V_SEGMENT_RESULT_STRU(){
        pGroundPoints.reset(new pcl::PointCloud<pcl::PointXYZ>);
        pNoGroundPoints.reset(new pcl::PointCloud<pcl::PointXYZ>);
    };
    pcl::PointCloud<pcl::PointXYZ>::Ptr pGroundPoints;
    pcl::PointCloud<pcl::PointXYZ>::Ptr pNoGroundPoints;
} V_SEGMENT_RESULT_STRU;

/**************************************************************************************
功能描述: 毫米波雷达数据
修改记录:
**************************************************************************************/
typedef struct {
    const RADAR_INFO_STRU *pstLeftRadarObst;    /* 左侧毫米波雷达扫描的数据 */
    const RADAR_INFO_STRU *pstFrontRadarObst;   /* 前向毫米波雷达扫描的数据 */
    const RADAR_INFO_STRU *pstRightRadarObst;   /* 右侧毫米波雷达扫描的数据 */
    const RADAR_INFO_STRU *pstBackRadarObst;    /* 后向毫米波雷达扫描的数据 */
} RADAR_DATE_LST_STRU;

#endif